<template>
	<view style="width: 100%;text-align: cneter;">
		<view class="item" :class="{curr: where[type] && where[type].id == item.id}" @click="select(index)" v-for="(item,index) in valueRange" :key="item.id">{{item.title}}</view>
	</view>
</template>

<script>
	export default{
		props:{
			type:{
				type: String
			},
			where:{
				type: Object
			},
			valueRange:{
				type: Array,
				default: null
			}
		},
		methods:{
			select(index){
				this.$emit("onSelect", {index})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.item{
		width: 100%;
		text-align: center;
		padding: 20rpx 0;
		border-bottom: solid 1px #eee;
		font-size: 30rpx;
		&.curr{
			color: #007aff;
		}
	}
</style>